<extend name="Public/base"/>
<block name="header">
    <li class="active"><a href="javascript:;">安装协议</a></li>
    <li class="active"><a href="javascript:;">环境检测</a></li>
    <li class="active"><a href="javascript:;">创建数据库</a></li>
    <li><a href="javascript:;">安装</a></li>
    <li><a href="javascript:;">完成</a></li>
</block>
<block name="body">
    <?php
        defined('SAE_MYSQL_HOST_M') or define('SAE_MYSQL_HOST_M', '127.0.0.1');
        defined('SAE_MYSQL_HOST_M') or define('SAE_MYSQL_PORT', '3306');
    ?>
    
    <div class="panel panel-default">
        <div class="panel-heading">
            <h1>创建数据库</h1>
        </div>
        <div class="panel-body">
            <form action="__SELF__" method="post" class="form-horizontal" target="_self">
                <fieldset>
                    <legend>数据库连接信息</legend>
                    <div class="form-group">
                        <label for="input-db-type" class="col-sm-2 control-label">
                            <span data-toggle="tooltip" title="服务器支持的情况下建议使用mysqli" data-original-title="">数据库连接类型</span>
                        </label>
                        <div class="col-sm-10">
                            <select id="input-db-type" class="form-control" name="db[]">
                                <option>mysqli</option>
                                <option>mysql</option>
                            </select>
                        </div>     
                    </div>
                    <div class="form-group">
                        <label for="input-db-server" class="col-sm-2 control-label">
                            <span data-toggle="tooltip" title="数据库服务器IP，一般为127.0.0.1" data-original-title="">数据库服务器</span>
                        </label>
                        <div class="col-sm-10">
                            <input id="input-db-server" class="form-control" type="text" name="db[]" value="<defined name='SAE_MYSQL_HOST_M'>{$Think.const.SAE_MYSQL_HOST_M}<else/>127.0.0.1</defined>">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="input-db-name" class="col-sm-2 control-label">数据库名</label>
                        <div class="col-sm-10">
                            <input id="input-db-name" class="form-control" type="text" name="db[]" value="<defined name='SAE_MYSQL_DB'>{$Think.const.SAE_MYSQL_DB}</defined>">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="input-db-username" class="col-sm-2 control-label">数据库用户名</label>
                        <div class="col-sm-10">
                            <input class="form-control" id="input-db-username" type="text" name="db[]" value="<defined name='SAE_MYSQL_USER'>{$Think.const.SAE_MYSQL_USER}</defined>">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="input-db-pwd" class="col-sm-2 control-label">数据库密码</label>
                        <div class="col-sm-10">
                            <input id="input-db-pwd" class="form-control" type="password" name="db[]" value="<defined name='SAE_MYSQL_PASS'>{$Think.const.SAE_MYSQL_PASS}</defined>">
                        </div>                           
                   </div>
                   <div class="form-group">
                        <label for="input-db-port" class="col-sm-2 control-label">
                            <span data-toggle="tooltip" title="数据库服务连接端口，一般为3306" data-original-title="">数据库端口</span>
                        </label>
                        <div class="col-sm-10">
                            <input class="form-control" id="input-db-port" type="text" name="db[]" value="<defined name='SAE_MYSQL_PORT'>{$Think.const.SAE_MYSQL_PORT}<else/>3306</defined>">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="input-db-prefix" class="col-sm-2 control-label">
                            <span data-toggle="tooltip" title="同一个数据库运行多个系统时请修改为不同的前缀" data-original-title="">数据表前缀</span>
                        </label>
                        <div class="col-sm-10">
                            <input id="input-db-prefix" class="form-control" type="text" name="db[]" value="mm_">
                        </div>
                    </div>
                </fieldset>
                <fieldset>
                    <legend>创始人帐号信息</legend>
                    <div  class="form-group">
                        <label for="input-admin-username" class="control-label col-sm-2">用户名</label>
                        <div class="col-sm-10">
                            <input class="form-control" id="input-admin-username" type="text" name="admin[]" value="Administrator">
                        </div>
                    </div>
                    <div  class="form-group">
                        <label for="input-admin-nickname" class="control-label col-sm-2">昵称</label>
                        <div class="col-sm-10">
                            <input class="form-control" id="input-admin-nickname" type="text" name="admin[]" value="mmcms">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="input-admin-pwd" class="control-label col-sm-2">密码</label>
                        <div class="col-sm-10">
                        <input id="input-admin-pwd" class="form-control" type="password" name="admin[]" value="">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="input-admin-cpwd" class="control-label col-sm-2">确认密码</label>
                        <div class="col-sm-10">
                        <input id="input-admin-cpwd" class="form-control"  type="password" name="admin[]" value="">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="input-admin-email" class="control-label col-sm-2">
                             <span data-toggle="tooltip" title="请填写正确的邮箱便于收取提醒邮件" data-original-title="">邮箱</span>
                        </label>
                        <div class="col-sm-10">
                            <input id="input-admin-email" class="form-control"  type="email" name="admin[]" value="">
                        </div>
                    </div>
                </fieldset>
            </form>
        </div>
    </div>
</block>
<block name="footer">
    <a class="btn btn-success btn-lg" href="{:U('Install/step1')}">上一步</a>
    <button id="submit" type="button" class="btn btn-primary btn-lg" onclick="$('form').submit();return false;">下一步</button>
</block>
